package com.office.doctorsoffice.domain;



import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.EntityTransaction;
import com.office.doctorsoffice.persistence.JPAUtil;


public class TestPatient {

		public static void main(String[] args) {
			
	      
			EntityManagerFactory emf = JPAUtil.getEntityManagerFactory();
			EntityManager em = JPAUtil.createEntityManager();
			EntityTransaction tx = em.getTransaction();
			tx.begin();
			Patient1 s1 = new Patient1();
			em.persist(s1);
			tx.commit();
			
			//Patient pat = service.createPatient(1,"Ilias", "Paidakakos", "Ivis 28", 
			//		"Galatsi", 11146, "6944438665", "paidakakosili@hotmail");
			em.close();
		
			//emf.close();
		}
}
